import sqlite3

conn = sqlite3.connect("test.db")

print("open database successful!")

c = conn.cursor()

# sql = """
#     create table company
#     (id int primary key not null,
#     name text not null,
#     age int not null,
#     address char(50),
#     salary real);
# """

# 插入数据
# sql = '''
#     insert into company(id, name, age, address, salary)
#     values(2, "kerry", 19, "湖南", 30000)
# '''

sql = '''
    select * from company
'''


rows = c.execute(sql)

for row in rows:
    print(row)
conn.commit()
conn.close()